<template>
  <CardMode class="facilities" title="预定须知">
    <div class="content">
      <div class="facilities">
        <div class="name">服务</div>
        <div class="msg-list">
          <div class="server">{{ hotel.timeoutRule }}</div>
        </div>
      </div>
      <div class="facilities">
        <div class="name">基础</div>
        <div class="msg-list">
          <div class="status">{{ hotel.cancelRule }}</div>
          <div class="server">订单确认30分钟后，取消订单将扣除全部房费</div>
        </div>
      </div>
      <div class="facilities">
        <div class="name">要求</div>
        <div class="list">
          <div class="item">
            <wd-icon name="check-outline" size="34rpx" color="#07C160"></wd-icon>
            接待婴儿
          </div>
          <div class="item">
            <wd-icon name="check-outline" size="34rpx" color="#07C160"></wd-icon>
            接待儿童
          </div>
          <div class="item">
            <wd-icon name="check-outline" size="34rpx" color="#07C160"></wd-icon>
            接待老人
          </div>
          <div class="item">
            <wd-icon name="check-outline" size="34rpx" color="#07C160"></wd-icon>
            带宠物
          </div>
          <div class="item">
            <wd-icon name="check-outline" size="34rpx" color="#07C160"></wd-icon>
            接待外宾
          </div>
          <div class="item">
            <wd-icon name="check-outline" size="34rpx" color="#07C160"></wd-icon>
            吸烟
          </div>
        </div>
      </div>
    </div>
  </CardMode>
</template>
<script setup lang="ts">
import { to } from '@/utils/page'
defineOptions({ name: 'Facilities' })

const props = defineProps(['hotel'])
</script>
<style lang="scss" scoped>
.facilities {
  :deep(.card-content) {
    padding: 0 30rpx;
  }
}
.content {
  .facilities {
    display: flex;
    @include border-bottom(#e6ecf0);
    padding: 15rpx 0;
    &:first-child {
      padding-top: 0;
    }
    &:last-child {
      @include border-bottom(transparent);
    }
    .name {
      width: 120rpx;
      padding: 15rpx 0;
      font-size: 27rpx;
      font-weight: 600;
      color: var(--color1);
    }
    .list {
      display: grid;
      flex: 1;
      grid-template-columns: 1fr 1fr 1fr;
      width: 0;
      .item {
        display: flex;
        padding: 15rpx 0;
        font-size: 23rpx;
        color: var(--color4);
        :deep(.wd-icon) {
          margin-right: 6rpx;
        }
      }
    }
    .msg-list {
      flex: 1;
      width: 0;
      padding: 15rpx 0;
      font-size: 23rpx;
      .server {
        line-height: 40rpx;
        color: var(--color3);
      }
      .status {
        font-weight: 600;
        line-height: 40rpx;
        color: var(--sc4);
      }
    }
  }
}
</style>
